package com.watercube.note.biz.user;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.alibaba.dubbo.config.ApplicationConfig;
import com.alibaba.dubbo.config.RegistryConfig;
import com.alibaba.dubbo.config.spring.context.annotation.DubboComponentScan;

@Configuration
@DubboComponentScan(basePackages = "com.watercube.note.biz.user.impl")
public class DubboConfiguration {

	@Bean
	@ConfigurationProperties(prefix = "dubbo.application")
	public ApplicationConfig applicationConfig() {
		ApplicationConfig applicationConfig = new ApplicationConfig();
		return applicationConfig;
	}

	@Bean
	@ConfigurationProperties(prefix = "dubbo.registry")
	public RegistryConfig registryConfig() {
		RegistryConfig registryConfig = new RegistryConfig();
		return registryConfig;
	}
}
